package com.open.capacity.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: open-capacity-platform
 * @description: 活动实体类
 * @author: bellweather
 * @create: 2021-01-18 16:03
 **/

@Data
@TableName("activity")
@EqualsAndHashCode(callSuper=true)
public class Activity extends Model<Activity> implements Serializable {
    private static final long serialVersionUID = -5886012896705137001L;
    @TableId(value="id",type= IdType.ASSIGN_ID)  //雪花算法  id生成策略
    @JsonSerialize(using= ToStringSerializer.class)
    private long id;
    private String title;
    private String desc;
    private String headerImg;
    private SysUser host;
    private int deleted;
    @TableField("create_time")
    private Date createTime;
}
